package fr.gestionimmoejb.model;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class RolePK implements Serializable {
	@Column(name="idUser", insertable=false, updatable=false)
	private Integer iduser;

	private String role;

	private static final long serialVersionUID = 1L;

	public RolePK() {
		super();
	}

	public Integer getIduser() {
		return this.iduser;
	}

	public void setIduser2(Integer iduser2) {
		this.iduser = iduser2;
	}

	public String getRole() {
		return this.role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	@Override
	public boolean equals(Object o) {
		if (o == this) {
			return true;
		}
		if ( ! (o instanceof RolePK)) {
			return false;
		}
		RolePK other = (RolePK) o;
		return this.iduser.equals(other.iduser)
			&& this.role.equals(other.role);
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.iduser.hashCode();
		hash = hash * prime + this.role.hashCode();
		return hash;
	}

}
